class LocalCache {
  TOKEN_KEY = 'HOUST_TOKEN'
  USER_INFO = 'USER_INFO'
  THEME_KET = 'THEME_KEY'

  setCache(key, value) {
    window.localStorage.setItem(key, JSON.stringify(value))
  }

  getCache(key) {
    const value = window.localStorage.getItem(key)
    if (value) {
      return JSON.parse(value)
    }
  }

  removeCache(key) {
    window.localStorage.removeItem(key)
  }
}

export default new LocalCache()
